<?php
/**
 * 获取web端中的路书下载校对key(地方站)
 * 本方法用于简单的防止恶意下载
 * @version $Id: guide_dlkey.func.php 12596 2012-04-11 07:36:37Z yaoying $
 * @return string
 */
function guide_dlkey($spots_id, $from = 'subsite'){
	$key = 'sub34TW#@$%^!Y';
	$uid_verify = '0';
	
	return substr(md5($key. '#'. $uid_verify. '#'. $spots_id. '#'. $key. $from), 12, 16);
}

/**
 * 获取web端中的路书下载URL
 * @param bigint $spots_id
 * @return string
 */
function guide_dlurl($spots_id){
	return URL('spots.guide_dl', 'spots_id='. $spots_id. '&key='. guide_dlkey($spots_id));
}